<template>
  <div class="margin-container-list radius-container">
    <div class="border-b pad-10 font-w font-15">
      <div>
        <span>岗位信息</span>
        <span v-if="dictNoteDTOS">{{ dictNoteDTOS[taskPosition.taskStatus] }}</span>
      </div>
    </div>
    <div class="pad-20">
      <el-form ref="form" :model="taskPosition" label-width="100px">
        <el-form-item label="岗位名称:">
          {{ taskPosition.positionName }}
        </el-form-item>
        <el-form-item label="预计支付酬金:">
          {{ taskPosition.positionCommission + '元'}}
        </el-form-item>
        <el-form-item label="录用人数:">
          {{ taskPosition.hireNum + '人' }}
        </el-form-item>
        <el-form-item label="工作描述:">
          {{ taskPosition.positionDescription }}
        </el-form-item>
      </el-form>
    </div>
  </div>
</template>

<style scoped>

</style>

<script>
  import { getTaskPosition } from '@/api/project/taskPosition'
  // 岗位详情
  export default {
    props: {
      //  positionId岗位id
      positionId: {
        type: String
      }
    },
    data() {
      return {
        dictNoteDTOS: [],
        taskPosition: {
          positionId: '',
          taskId: '',
          positionName: '',
          hireNum: '',
          positionCommission: '',
          positionDescription: '',
          taskStatus: ''
        }
      }
    },
    // 过滤器
    filters: {
      statusFilter(status) {
        const statusMap = {
          1: 'success',
          2: 'danger'
        }
        return statusMap[status]
      }
    },
    // 初始化页面
    created() {
      this.initTaskPositionList()
    },
    methods: {
      initTaskPositionList() {
        getTaskPosition(this.positionId).then(response => {
          this.taskPosition = response.data
          this.dictNoteDTOS = response.data.dictNoteDTOS
        })
      }
    },
    mounted() {
    }
  }
</script>
